package com.cloudfun.campusshare.common.model.dto;

import com.cloudfun.campusshare.common.constant.ProductType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;

/**
 * Created by Huqin on 2020/5/11
 */
@Data
public class BaseDeviceModeSetDTO {

    @ApiModelProperty("名称")
    @NotEmpty(message = "名称不能为空", groups = Create.class)
    @Length(max = 20, message = "名称限制20个字")
    private String name;

    @ApiModelProperty("品牌")
    @NotEmpty(message = "品牌不能为空", groups = Create.class)
    private String brandId;

    @ApiModelProperty("产品类型")
    @NotNull(message = "产品类型不能为空", groups = Create.class)
    private ProductType productType;

    @ApiModelProperty("设备类型")
    @NotEmpty(message = "设备类型不能为空", groups = Create.class)
    private String deviceType;

    @ApiModelProperty("描述")
    @Length(max = 20, message = "备注限制20个字")
    private String description;

    public static interface Create extends Default {

    }


}
